<template>
	<view class="content">
		<view class="content_time">
			{{itemResume.datetime}}
		</view>
		<view class="content_item" @click="handleLink" v-if="itemResume.message">
			<view class="content_item_tp u-border-bottom">
				<view class=" u-flex u-row-between">
					<view>
						<view class="u-font-36 u-font-weight">{{itemResume.message.fullname}}</view>
						<view class="u-m-t-10" style="color: #8a8888;">
							{{`${itemResume.message.age}岁 · ${itemResume.message.education} · ${itemResume.message.experience}`}}
						</view>
					</view>
					<u-avatar :src="itemResume.avatar"></u-avatar>
				</view>

				<view class="u-m-t-20 u-font-30" style="color: #666666;">
					期望：
					<text>{{itemResume.message.intention_category}}</text>
					<text class="u-m-l-20" style="color: #ff5017;">{{itemResume.message.intention_wage}}</text>
				</view>
			</view>

			<view class="content_item_btm">
				<view class="u-flex u-m-b-10" v-if="itemResume.message.education_school">
					<u-image src="/pages/pagesMessage/static/resume-bg-1.png" width="32" height="28"></u-image>
					<view class="u-m-l-20">
						{{`${itemResume.message.education_school} · ${itemResume.message.education_major}`}}
					</view>
				</view>
			<!-- 	<view class="u-flex ">
					<u-image src="/pages/pagesMessage/static/resume-bg-2.png" width="32" height="28"></u-image>
					<view class="u-m-l-20">
						{{`${itemResume.message.work_companyname} · ${itemResume.message.work_jobname}`}}
					</view>
				</view> -->
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref,
		watch
	} from 'vue'
	const itemResume = ref({})
	const props = defineProps({
		itemResume: Object
	})
	watch(()=>props.itemResume,(nv)=>{
		itemResume.value = nv
	},{
		immediate:true,
		deep:true
	})
	const handleLink = () => {
		// 1-跳转简历详情页面 2-跳转个人简历页面
		if (uni.getStorageSync('utype') == 1) {
			uni.$u.route('pages/pagesHome/detailPages/resume', {
				id: itemResume.value.message.resumeid
			})
		} else {
			uni.$u.route('pages/pagesPersonal/myResume/myResume')
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		margin-bottom: 40rpx;

		&_time {
			text-align: center;
			margin: 46rpx 0 28rpx 0;
			color: #999999;
			font-size: 24rpx;
		}

		&_item {
			width: 90vw;
			background-color: #fff;
			margin: 0 auto;
			border-radius: 20rpx;
			font-size: 28rpx;
			padding: 0 20rpx;
			color: #101010;

			&_tp {
				padding: 20rpx 16rpx;
			}

			&_btm {
				padding: 30rpx 20rpx;
				color: #666666;
				font-size: 26rpx;
			}
		}

	}
</style>